set.seed(123)
#require(gRbase) #for faster computations in the internal functions
require(hash)
#simulate a dataset with continuous data
dataset <- matrix( runif(1000 * 50, 1, 100), ncol = 50 )
#define a simulated class variable
target <- 3 * dataset[, 10] + 2 * dataset[, 20] + 3 * dataset[, 30] + rnorm(1000, 0, 5)
a <- lm.fsreg(target, dataset, threshold = 0.05, stopping = "BIC", tol = 2,
robust = FALSE, ncores = 1 )
b <- fs.reg(target, dataset, threshold = 0.05, test = NULL, stopping = "BIC", tol = 2,
robust = TRUE, ncores = 1 )
Run the code above in your browser using DataLab